package com.yz.bi.config;

import com.yupi.yucongming.dev.client.YuCongMingClient;
import com.yz.bi.properties.YuAiProperties;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * User:Mr.Du
 * Date:2024/4/10
 * Time:22:00
 */
@Slf4j
@Component
public class YuConfig {

    @Resource
    private YuAiProperties yuAiProperties;

    @Bean
    public YuCongMingClient yuCongMingClient() {
        log.info("yuAiProperties:{}", yuAiProperties);
        return new YuCongMingClient(yuAiProperties.getAccessKey(), yuAiProperties.getSecretKey());
    }
}
